package nc.tb.ctlscheme.ui;

import java.awt.Component;

import nc.tb.app.vo.IdCtrlschmBVO;
import nc.tb.pub.ref.BillTypeRef;
import nc.tb.pub.table.UAPDocCellEditor;
import nc.ui.pub.beans.UIRefPane;


public class UAPDocCellEditor4ControlRule extends UAPDocCellEditor {

	public UAPDocCellEditor4ControlRule(UIRefPane ref) {
		super(ref);
	}
	
	public java.awt.Component getTableCellEditorComponent(
        	javax.swing.JTable table, 
        	Object value, 
        	boolean isSelected, 
        	int row, 
        	int column) 
    {

    	Component c=super.getTableCellEditorComponent(table, value, isSelected, row, column);
    	if(c instanceof BillTypeRef){
    		IdCtrlschmBVO vob = null;
    		if(table.getModel() instanceof ZcomplexSepTab2.ContrastSepTableModel){
    			vob = ((ZcomplexSepTab2.ContrastSepTableModel)table.getModel()).getCtlSschemBVO(row);
    		}
    		
    		((BillTypeRef)c).setPK(vob.getPk_bdcontrast());
    	}
    	

    	return c;
    	
    }

}